from app.model import BaseModel
from typing import List
import dataclasses


class Coordinate(BaseModel):
    x: float
    y: float


class Glasses(BaseModel):
    type: str
    probability: float = 0


class Mask(BaseModel):
    type: int
    probability: float = 0


class QualityOcclusion(BaseModel):
    left_eye: float = 0
    right_eye: float = 0
    nose: float = 0
    mouth: float = 0
    left_cheek: float = 0
    right_cheek: float = 0
    chin_contour: float = 0


class Quality(BaseModel):
    occlusion: QualityOcclusion
    blur: float = 0


class Location(BaseModel):
    left: float
    top: float
    width: float
    height: float
    rotation: int


class Angle(BaseModel):
    yaw: float
    pitch: float
    roll: float


class Landmark150(BaseModel):
    chin_2: Coordinate
    nose_tip: Coordinate
    cheek_left_4: Coordinate
    cheek_right_4: Coordinate
    eye_left_eyeball_center: Coordinate
    eye_right_eyeball_center: Coordinate


class EyeStatus(BaseModel):
    left_eye: float = 1
    right_eye: float = 1


class BaiduFaceDetect(BaseModel):
    location: Location
    angle: Angle
    quality: Quality
    mask: Mask
    glasses: Glasses
    landmark150: Landmark150
    spoofing: float = 0
    eye_status: EyeStatus
